package com.wise.summer.v1.cms.content.verificationcode;

import com.wise.framework.annotations.*;
import com.wise.framework.annotations.validation.AssertEnum;
import com.wise.framework.annotations.validation.NotNull;
import com.wise.framework.summer.BasicSummer;
import com.wise.model.content.GetVerificationCodeResult;
import com.wise.model.content.utils.UseCodeType;
import com.wise.model.content.utils.VerificationCodeType;
import lombok.Getter;
import lombok.Setter;

import static com.wise.model.content.ContentErrMsgs.Err_100100110001;

@ApiInfo("获取验证码")
@Setter
@Getter
@Publish
@SkipUserAuth
public class GetVerificationCode extends BasicSummer<GetVerificationCodeResult> {
    @ApiInfo("手机号码/账户名")
    private String account;

    @NotNull(msg = Err_100100110001)
    @ApiInfo("验证码类型")
    @EnumField(enumClass = VerificationCodeType.class)
    private Integer type;

    @Required
    @ApiInfo("使用方式")
    @AssertEnum(enumClass = UseCodeType.class, msg = Err_100100110001)
    private Integer useType;

    @ApiInfo("手机区号，不填默认86")
    private String areaCode;
}
